<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div>
    <p></p>
  </div>
  <script src="./jq-3.6.0.min.js"></script>
  <script>

    // 检测dom1中是否包含dom2
    // 需要注意的是  这里的dom1 dom2必须是原生js获取到的dom
    // 否则检测是无效的
    var dom1 = document.getElementsByTagName('div')[0];
    var dom2 = document.getElementsByTagName('p')[0];
    console.log($.contains(dom1, dom2));

    // 检测数据类型
    console.log($.type(2));
    console.log($.type(null));
    console.log($.type(undefined));
    console.log($.type([]));
    console.log($.type({}));
    console.log($.type(true));
    console.log($.type(function(){}));
  </script>
</body>
</html>